
from pathlib import Path
import json
Problem_DIR=Path(__file__).parent.parent.parent.resolve()/"problem/" #settings.PROBLEM_DIR

from enum import Enum

class ProblemType(Enum):
    TEXT="text"
    NORMAL="normal"
    SPECIAL="special"

class CompareType(Enum):
    SYSCMD="syscmd"
    CHECKER="checker"


class StatusType(Enum):
    ACCEPTED="AC"
    FAILED="SE"
    UNACCEPTED="UAC"
    OLE="OLE"
    MLE="MLE"
    TLE="TLE"
    WRONG="WA"
    WAITING="WJ"

def get_problem_path(prob:str)->Path:
    print("PB ",Problem_DIR)
    return Problem_DIR/prob

def get_problem_meta(prob:str):
    file:Path=get_problem_path(prob)/"meta.json"
    fp=file.open()
    return json.loads(fp.read())


    # not to notify judgemgmt now

